#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int n = 0;
	scanf("%d ", &n);
	int count = 0;
	int arr[n];
	int a = 0;
	int b = 0;
	int c = 0;
	while(scanf("%d ",&a)!=EOF)
	{
		arr[c] = a;
		c++;
	}
	int i = 1;
	for(i = 1; i <= n - 1; i++)
	{
		int t = 0;
		for(t = 0; t < n - 1; t++)
		{
			 a = abs(arr[t]-arr[t+1]);
			if ( a == i)
			{
				count++;
				break;
			}
		}
	}
	if(count == n)
	{
		printf("Jolly");
	}
	else
	{
		printf("Not jolly");
	}
}
